﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/MasterPage.master" AutoEventWireup="true"
    CodeFile="OfficesConfirm.aspx.cs" Inherits="ServicesSheet_OfficesConfirm" %>

<%@ Register Src="../Control/DSelYearMonth.ascx" TagName="DSelYearMonth" TagPrefix="uc3" %>
<%@ Register Src="../Control/DepartmentDList.ascx" TagName="DepartmentDList" TagPrefix="uc1" %>
<%@ Register src="../Control/SelUser.ascx" tagname="SelUser" tagprefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Titile" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="Server">

    <script language="Javascript">
        function CheckAll(chkAll) {

            //            var indexChkAll;

            //
            //

            var chk = document.getElementsByTagName("span");
          
         
            //
            for (i = 0; i < chk.length; i++) {
                if (chk[i].name == "wgvChk") {
                    chk[i].childNodes[0].checked = chkAll.checked;
                }
                 //chk[i].checked = chkAll.checked;            
            }

            //            indexChkAll = chkAll;
            //            
            //            var i;
            //            for (i = 0; i < document.form1c.elements.length; i++) {
            //                if ((document.forms['aspnetForm'].elements[i].type == 'checkbox') && (document.forms['aspnetForm'].elements[i].name.indexOf(chkAll) > -1)) {
            //                    var objChkAll = document.forms['aspnetForm'].elements[i];

            //                }
            //            }


            //            var tempObj;
            //            for (i = 0; i < document.forms['aspnetForm'].elements.length; i++) {
            //                tempObj = document.forms['aspnetForm'].elements[i];
            //                if (tempObj.type == "checkbox" && tempObj.id != indexChkAll) {
            //                    tempObj.checked = objChkAll.checked;
            //                }
            //            }
        }
    </script>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Content" runat="Server">
    <infolight:webdatasource id="Master" runat="server" autoapply="True" webdatasetid="WMaster"
        datamember="View_Services_OfficeSupplies">
    </infolight:webdatasource>
    <infolight:webdatasource id="wdsEmpId" runat="server" cachedataset="True" selectalias="Usasdb"
        selectcommand="select &#13;&#10;Employees.EmployeeID,&#13;&#10;Employees.EmpName,&#13;&#10;Department.DepartmentName &#13;&#10;FROM Employees&#13;&#10; left join Department on Employees.DepartmentId=Department.DepartmentId&#13;&#10;WHERE (Employees.EmpStatus = 1)">
    </infolight:webdatasource>
    <table cellpadding="0" cellspacing="5" class="TbSearch">
        <tr>
            <td style="width: 40px;">
                部门：
            </td>
            <td>
                <uc1:DepartmentDList ID="DepartmentDList1" runat="server"></uc1:DepartmentDList>
            </td>
            <td style="width: 40px;">
                日期：
            </td>
            <td colspan="2" style="width: 40px;">
                <uc3:DSelYearMonth ID="DSelYearMonth1" runat="server"></uc3:DSelYearMonth>
            </td>
            <td style="width: 40px;">
                <asp:Label ID="Label23" runat="server" Text="员工:"></asp:Label>
            </td>
            <td>
                <uc2:SelUser ID="SelUser" runat="server" />
            </td>
            <td style="width: 50px">
            </td>
        </tr>
        <tr>
            <td colspan="7" style="text-align: right;">
                <span class="roundbtn">
                    <asp:LinkButton ID="btnSearch" runat="server" Text="&nbsp;&nbsp;&nbsp;&nbsp;查 询&nbsp;&nbsp;&nbsp;&nbsp;" OnClick="btnSearch_Click"></asp:LinkButton>
                </span>&nbsp; &nbsp; &nbsp; &nbsp; <%--<span class="roundbtn">
                    <asp:LinkButton ID="btnClear" runat="server" Text="清除条件" OnClick="btnClear_Click"></asp:LinkButton>
                </span>--%>&nbsp; &nbsp; &nbsp; &nbsp; <span class="roundbtn">
                    <asp:LinkButton ID="btnSave" runat="server" Text="行政确认保存" OnClick="btnSave_Click"
                        CommandName="Save" OnClientClick="return confirm('确认执行？')"></asp:LinkButton>
                </span>
            </td>
        </tr>
    </table>
    </div>
    <infolight:webgridview id="wgvMaster" runat="server" borderwidth="2px" borderstyle="Groove"
        bordercolor="White" backcolor="White" pagesize="20" onrowdatabound="wgvMaster_RowDataBound"
        headerstylewrap="False" queryiconurl="../Image/UIPics/Query.gif" okiconurl="../Image/UIPics/OK.gif"
        mouseoverqueryiconurl="../Image/UIPics/Query2.gif" mouseoverokiconurl="../Image/UIPics/OK2.gif"
        mouseovercanceliconurl="../Image/UIPics/Cancel2.gif" mouseoverapplyiconurl="../Image/UIPics/Apply2.gif"
        mouseoveraddiconurl="../Image/UIPics/Add2.gif" mouseoveraborticonurl="../Image/UIPics/Abort2.gif"
        canceliconurl="../Image/UIPics/Cancel.gif" applyiconurl="../Image/UIPics/Apply.gif"
        addiconurl="../Image/UIPics/Add.gif" aborticonurl="../Image/UIPics/Abort.gif"
        width="100%" forecolor="#333333" datasourceid="Master" cellpadding="5" showfooter="True"
        totalactive="True" totalcaption="合计：" createinnernavigator="False" name="wgvMaster">
        <pagersettings mode="NumericFirstLast" />
        <footerstyle forecolor="Red" font-bold="True"></footerstyle>
        <navcontrols>
<InfoLight:ControlItem ControlVisible="True" Size="25" MouseOverImageUrl="../image/uipics/add2.gif" ControlText="add" ControlName="Add" ControlType="Image" ImageUrl="../image/uipics/add.gif"></InfoLight:ControlItem>
<InfoLight:ControlItem ControlVisible="True" Size="25" MouseOverImageUrl="../image/uipics/ok2.gif" ControlText="Insert" ControlName="OK" ControlType="Image" ImageUrl="../image/uipics/ok.gif"></InfoLight:ControlItem>
<InfoLight:ControlItem ControlVisible="True" Size="25" MouseOverImageUrl="../image/uipics/cancel2.gif" ControlText="cancel" ControlName="Cancel" ControlType="Image" ImageUrl="../image/uipics/cancel.gif"></InfoLight:ControlItem>
</navcontrols>
        <columns>
                <asp:BoundField DataField="SuppliesId" HeaderText="申请编码" SortExpression="SuppliesId" Visible="False" />
                <asp:BoundField DataField="DetailsId" HeaderText="明细编码" SortExpression="DetailsId" Visible="False" ></asp:BoundField>
                <asp:TemplateField HeaderText="日期">
                    <itemtemplate>
<asp:Label id="Label1" runat="server" Text="Label" __designer:wfdid="w104"></asp:Label> 
</itemtemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="SuppliesYear" HeaderText="申请年份" SortExpression="SuppliesYear" Visible="False" ></asp:BoundField>
                <asp:BoundField DataField="SuppliesMonth" HeaderText="申请月份" SortExpression="SuppliesMonth" Visible="False" ></asp:BoundField>
                <asp:BoundField DataField="EmpName" HeaderText="员工" SortExpression="EmpName" ></asp:BoundField>
                <asp:BoundField DataField="DepartmentName" HeaderText="部门" SortExpression="DepartmentName" ></asp:BoundField>
                <asp:BoundField DataField="SName" HeaderText="办公品名称" SortExpression="SName" ></asp:BoundField>
                <asp:BoundField DataField="SType" HeaderText="型号" SortExpression="SType" ></asp:BoundField>
                <asp:BoundField DataField="Counts" HeaderText="数量" SortExpression="Counts" ></asp:BoundField>
                <asp:BoundField DataField="SAmount" HeaderText="金额" SortExpression="SAmount" DataFormatString="{0:C}" ></asp:BoundField>
                <asp:TemplateField HeaderText="确认" SortExpression="IsConfirm">
                    <headertemplate>
<asp:CheckBox id="SCheck" onclick="CheckAll(this)" runat="server" Text="行政确认" __designer:wfdid="w10"></asp:CheckBox> 
</headertemplate>
                    <itemtemplate>
<CENTER><DIV style="WIDTH: 100px"><asp:CheckBox id="CheckBox1" runat="server" __designer:wfdid="w7" name="wgvChk"></asp:CheckBox></DIV></CENTER><asp:HiddenField id="HiddenField1" runat="server" __designer:wfdid="w8" Value='<%# Eval("SuppliesId") %>'></asp:HiddenField> <asp:HiddenField id="HiddenField2" runat="server" __designer:wfdid="w9" Value='<%# Eval("DetailsId") %>'></asp:HiddenField> 
</itemtemplate>
                </asp:TemplateField>
</columns>
        <rowstyle backcolor="#EFF3FB"></rowstyle>
        <editrowstyle backcolor="#2461BF"></editrowstyle>
        <selectedrowstyle backcolor="#D1DDF1" forecolor="#333333" font-bold="True"></selectedrowstyle>
        <pagerstyle backcolor="LightBlue" forecolor="White" horizontalalign="Center"></pagerstyle>
        <headerstyle backcolor="DeepSkyBlue" forecolor="White" font-bold="True"></headerstyle>
        <alternatingrowstyle backcolor="White" bordercolor="White"></alternatingrowstyle>
        <totalcolumns>
            <InfoLight:GridViewTotalItem FieldName="SAmount" />
        </totalcolumns>
    </infolight:webgridview>
</asp:Content>
